Scope of constants in drupal
This is more a PHP question than a Drupal one...

Global constants cannot be re-declared within the same request (well, short of using an extension: https://stackoverflow.com/questions/8465155/redefine-constants-in-php).

Since everything in Drupal 7 and below is in the global scope, you can't redeclare those variables within the same request. 

If it's hard-coded and causing you a problem, a patch to the module in question to allow contextually different API credentials would be the best thing to do IMO.