UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1LxVpdsdsneVvOj/fh4FXgDI7NuO4ZOXleWWJxX6KLw=' 
WHERE 
  key_id = '6d654dac4a42ee95cf173e49a9ca80e94d24ecd4ca55deb71cac14b103b84dd2' 
  AND (
    token = '1LxVpdsdsneVvOj/fh4FXgDI7NuO4ZOXleWWJxX6KLw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00060