UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'BxjxHIVNrpII8FWrlFm4yB4JJgGnFXL4mKrsSgusydM=' 
WHERE 
  key_id = 'fc1eeb4aa1817d46b63b1c72b29ab11f44876ab428ee6a01de0af3c7ec2785ca' 
  AND (
    token = 'BxjxHIVNrpII8FWrlFm4yB4JJgGnFXL4mKrsSgusydM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017