UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FP+u1OhaSQmuE/C9ONKvWiLBHC8rLe7RAANl3XNl0QE=' 
WHERE 
  key_id = 'dc9af56e62f10ad40e2d5e532986494b90ba99e0dc8772d3211b41f468780293' 
  AND (
    token = 'FP+u1OhaSQmuE/C9ONKvWiLBHC8rLe7RAANl3XNl0QE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030