UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'orMGEU0zdZLLG8paIoZvUArqYT1hqmE4y7qui3tx2zY=' 
WHERE 
  key_id = '756e97cb0650cb7e775b87a8f47305fe2e6af168df6b57425efa483b9a4b869d' 
  AND (
    token = 'orMGEU0zdZLLG8paIoZvUArqYT1hqmE4y7qui3tx2zY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035