add token support for upgrade.php

added token support for upgrade.php