UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '8R8aO/AIK2LXVzvILnbxWLIe2QUeev2rrs8sLdDPvZ0=' 
WHERE 
  key_id = 'a32e18563e9364009f121c843f9413f31812c17797472ff2f21ecd4e9f19aad6' 
  AND (
    token = '8R8aO/AIK2LXVzvILnbxWLIe2QUeev2rrs8sLdDPvZ0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020