Unfortunately, I'm working in-office on this one and the testing server here is PHP 5.0.8. ewww. So I'm annoyingly working on the live server (passworded sub-domain).
When you say mySQL will close the connection if it is idle. I think this could be possible as for the 85 seconds its not constantly executing queries and the full thing is wrapped in a transaction so I guess there could be maybe up to 30 seconds between queries. Maybe even more, I'm going to add in simpe time outputting to try and figure out whats going on.
At the moment I'm just testing the script by running it manually, ie. goign to the URL. However, once its set up as a cron job will it have different permissions? I didn't think of this before...
I'm emailing the DBA at the moment and hopefully that will help