When you use %const['lookup_id']['key']% it is the equivalent of writing that exact string of text in your script. In this case, the script in the button is throwing an exception but that may be a copy/paste issue. If I type:
<lookup id="globVars">
<entry key="vars">var teamA="myTeam";
var teamB="yourTeam";</entry>
</lookup>
(remove the extra "var" at the end)
and remove the "/" at the start of:
<button buttontype="push" height="100" id="btn1l" left="1050" name="UPDATE VARS" style="look:flat;fg#FFFF00;" top="90" width="200">
<task tasktype="ogscript">%const['globVars']['vars']%;
teamA="TEAM A";
teamB="TEAM B";
ogscript.debug(teamA);
ogscript.debug(teamB);</task>
</button>
I do get "TEAM A" and "TEAM B" printed.
That said, I strongly-recommend you reconsider your approach here. Using look-ups to store blocks of script was a common approach before the tag was created. Now that it exists, you are better-off declaring your common code and variables in one of those tags and working with them directly.
<api immediate="true" name="Global Variables">var teamA="myTeam";
var teamB="yourTeam";</api>
<button buttontype="push" height="100" id="btn1l" left="1050" name="UPDATE VARS" style="look:flat;fg#FFFF00;" top="90" width="200">
<task tasktype="ogscript">teamA="TEAM A";
teamB="TEAM B";
ogscript.debug(teamA);
ogscript.debug(teamB);</task>
</button> #DashBoard