UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'MVc8rXLJ7DHZXGUdWpGZRFx8+7k7u5pD6Fg4W7J46YE=' 
WHERE 
  key_id = '8e107e56b4126b60aba70978b9c523dcd337a570d8705fb808a50350c88ac612' 
  AND (
    token = 'MVc8rXLJ7DHZXGUdWpGZRFx8+7k7u5pD6Fg4W7J46YE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030