UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'yLY+z0ci/0qutL3JAM3Kw8R8oDVQXdfHJlX5PtkgWYI=' 
WHERE 
  key_id = 'f0e312a5816c0fd61a8a0a258f6d5346592f4788399d63ab0b453a1aa95e0026' 
  AND (
    token = 'yLY+z0ci/0qutL3JAM3Kw8R8oDVQXdfHJlX5PtkgWYI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021