UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2hzhzhzKsRg1lCSIb5SlnPPgMuMcKuHm7hdwk7/zjrA=' 
WHERE 
  key_id = '10c5b3eab68eec92f62a974875c00ca57f4ac5ca35a44c6bc7f015dc79c8f157' 
  AND (
    token = '2hzhzhzKsRg1lCSIb5SlnPPgMuMcKuHm7hdwk7/zjrA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029