UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 's8OERU4CWp+OB9eBznNuOZ0pUIVe2WuNG94Uq6niNsA=' 
WHERE 
  key_id = '622b96939932628fb4b81de0bed6a6ca884d81ad199d85c5179ce268b17a2c81' 
  AND (
    token = 's8OERU4CWp+OB9eBznNuOZ0pUIVe2WuNG94Uq6niNsA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00177