UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'IaYnNeQABVCEPzgWMQLIiGWMOXOxdGpHuY0Rs52c12M=' 
WHERE 
  key_id = '5680ca67eca2a5d04497ffc67cf1e5a76e2fe98b105265581b04027cf8cc5751' 
  AND (
    token = 'IaYnNeQABVCEPzgWMQLIiGWMOXOxdGpHuY0Rs52c12M=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038