Depends what you're doing at 40mph. Going down a hill or on a flat, 6th gear will be more economical that 3rd for example as you're putting no strain on the car to keep a constant speed due to the cog ratio
However, 40mph up a hill or accelerating in 6th will put strain on the car but you won't go anywhere so you're just wasting fuel
It's all about making the car do the least amount of work