One of the things you need to take into consideration is he only has 40* minutes if his flight arrives ON TIME. If it arrives late, then the 40 minute window is shot.
* Is that 40 minutes a true free 40 minutes, or is part of that 40 going to be boarding the next plane, which closes its doors 10 minutes before departure?
Cheers.