UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4xGrSPehXAgwM0dMr6fVtXTQS/aR2ruoWBycqMvI6uc=' 
WHERE 
  key_id = '1fb6d4291de2ece581b731b1086519a6cb8ae471ed53833866413b8f3670ab67' 
  AND (
    token = '4xGrSPehXAgwM0dMr6fVtXTQS/aR2ruoWBycqMvI6uc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00045