UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rCOtHx64xgzGY9yYJ7t3/SG4ETZ8RLDHUn+M8Oz6c2Y=' 
WHERE 
  key_id = '35fc7b817a790b9a6e91e3fb718e2c7bf5d2a8bef8c5a0a1f7263b40850ed489' 
  AND (
    token = 'rCOtHx64xgzGY9yYJ7t3/SG4ETZ8RLDHUn+M8Oz6c2Y=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030