UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'K2nxwxro3oJfn7/whw5FfU7EInQS51IGjU9cq3fZiDM=' 
WHERE 
  key_id = 'f1bd3a75e9003c8f03582a2874d092a4d9a133e59c8cb8bea0a198c678bd272d' 
  AND (
    token = 'K2nxwxro3oJfn7/whw5FfU7EInQS51IGjU9cq3fZiDM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035