First, I would forget about doing this in a script.
Do it in the commandline tool, that's what it is there for.
Second, the script will not time out if you use set_time_limit() to reset the limit.
Third, you can select the converted date like this:
SELECT CONCAT(SUBSTRING(datefield, 7, 4), '/', SUBSTRING(datefield, 4, 2), '/', SUBSTRING(datefield, 1, 2)) FROM table;
I probably switched the DD and MM around, check it.
To update all the records in one go:
UPDATE table
SET datefield = CONCAT(SUBSTRING(datefield, 7, 4), '/', SUBSTRING(datefield, 4, 2), '/', SUBSTRING(datefield, 1, 2));
I STRONGLY advise that you TEST this thoroughly before you do it on the final data, and make sure you have a backup of that data before you do it.
After the conversion is complete you can change the column type from varchar/char to date, which will automatically convert the strings to 'real' dates.