UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '63xVsY7XFAIhWQ5GGGIDDRwxFWo8Loil/OBuHtGh5ek=' 
WHERE 
  key_id = '7ff0d097447b68ddb0e6689d545ed31a608d1a43d13885aef4281fe2c812553d' 
  AND (
    token = '63xVsY7XFAIhWQ5GGGIDDRwxFWo8Loil/OBuHtGh5ek=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033