Personally, I think a 40g TANK is not suited for a ball python simply because TANKS (especially the large ones) are meant for FISH. They are usually very very tall, much taller than your snake would need.
A 5' x 2' seems excessive for a ball python, but if thats what you want to do.. then go for it. Make sure you have lots of hides and multiple hot spots for your snake. Most ball pythons are not nearly as active as you claim yours to be. As long as the snake is eating/shedding/pooping regularly than it will probably be fine. I can't say you will find many people on this forum who keep their ball pythons in a similarly sized enclosure though. Most of us use tubs.