MySQL script writing slow
I've realised that using an alternative query structure helps to speed this up.

UPDATE table1 SET is_active = 1 WHERE id IN (1,2,3,4,...) 


Works much quicker and reduces the script file size to 11kb from 114kb and also reduces running time from 40 secs to just under 2 secs