UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'OB9j+vrwrtEDekMiYFbK6+2Y/nSyF7yvOVmwUoK4rPE=' 
WHERE 
  key_id = 'a75f34e5995c7cfab6505d4a95bf7df8377315183d0e2ae253e6c2fa659d07f2' 
  AND (
    token = 'OB9j+vrwrtEDekMiYFbK6+2Y/nSyF7yvOVmwUoK4rPE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025