UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7OO1VFlOrUU1vNtPrbZV/RLuAUDwPRmYrUn5k0vCnlY=' 
WHERE 
  key_id = '2d0c4c27010222eb0710b3d8cf101730a61e83ea12fc2cf2b0311124f0f2da1c' 
  AND (
    token = '7OO1VFlOrUU1vNtPrbZV/RLuAUDwPRmYrUn5k0vCnlY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015