Optimize execution time of a php script

Job ID: 35541486

Budget: $30 – $250 USD

I have a php script that fetches large number of records from a mysql table, calls a web service and checks and updates each record based on the webservice response.
Script is executed by a cron job several times a day.
Execution time currently is more than 10 hours. I need to optimize the execution time/the script and the database.
Related categories: PHP JavaScript XML Software Architecture MySQL