UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xLOdZNcFUMgn+uEJDZTPfQtKnsdMXivyL2f2V6eqVqU=' 
WHERE 
  key_id = '619acaa385d4a09ff0d5e0e6b67d1d9d0d48aadce93e87c88844e622ed8b1248' 
  AND (
    token = 'xLOdZNcFUMgn+uEJDZTPfQtKnsdMXivyL2f2V6eqVqU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039