UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'gzZK9vDeuPFZK+F71xaCBF9DYKuYx0dTEDBGmblm0ok=' 
WHERE 
  key_id = '135e994f4a132fe14b4ba5999f20771c2706e7e845337ad0a10cef9d3811cdea' 
  AND (
    token = 'gzZK9vDeuPFZK+F71xaCBF9DYKuYx0dTEDBGmblm0ok=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048