UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ifPtmMliAJ/5bF+aBXZ1p1m4BnFnXu/jimlzIZcTRHI=' 
WHERE 
  key_id = 'b894ae01922ac802981611d4fcde9b5a89d4ab1968e513c65b4c21efbc2bfdb0' 
  AND (
    token = 'ifPtmMliAJ/5bF+aBXZ1p1m4BnFnXu/jimlzIZcTRHI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016