If you are acquiring a hatchling, and it's an Argentine Black & White tegu, I would think a 40 gallon tank will last no more than a couple of months, if that.
Args can reach 3 feet in a year and a half if not wintered, in 3 years if they are wintered (hibernated).
I'm not positive of the dimensions of a 40 gal as I make my own enclosures (in my opinion fish tanks are for fish), but at 2 feet I would recommend a cage at least 6x3x3, with larger being better.
The bigger the enclosure, the happier the tegu; and the keeper.
Chris
"That cute little lizard in the pet shop will, in a few short years, become an enormous, ferocious carnivore; capable of breaking the family cat's neck in a single snap and swallowing it whole." - Daniel Bennett