UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nlY2bhM3r/X3lwtPHfyXosbzXIcjm7mQMoOQAJ0GF1E=' 
WHERE 
  key_id = '3eb3c5a9b368ec99e40da513a6a77c5ba98fff0feef3253e3b45e1c9558b4685' 
  AND (
    token = 'nlY2bhM3r/X3lwtPHfyXosbzXIcjm7mQMoOQAJ0GF1E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031