UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'r7fHbWWYiOpy8rvZ2eRINYMtQhz5GFCUieOcT5RLIKo=' 
WHERE 
  key_id = '4c44abcaed697c4ef7aaba7d89f89137bdd1a7e3502d1e9d3e9c1eebda78fcb4' 
  AND (
    token = 'r7fHbWWYiOpy8rvZ2eRINYMtQhz5GFCUieOcT5RLIKo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041