UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '03s3Gt7wLHwzBUslKlEuaeqllkD+o+S//HjE8VMnB5A=' 
WHERE 
  key_id = '444bdc4ca918e718fca9b0189d8e9cef8df4da2495e17ef0b85c8ec7664853ef' 
  AND (
    token = '03s3Gt7wLHwzBUslKlEuaeqllkD+o+S//HjE8VMnB5A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033