UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'c3aximIZtHKCUMzh8Yfp9/6meQk8KsTNFyAU2nHM/DI=' 
WHERE 
  key_id = '98ad576eca00c26d79c1089807f0f890bdd9b47176ed4640bfa3ee9f981ddb17' 
  AND (
    token = 'c3aximIZtHKCUMzh8Yfp9/6meQk8KsTNFyAU2nHM/DI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037