How can it affect the replication lag then? Please find out the real source of these problems and do not kill random processes.
It was definitely the cause. it was the only thing that was started when replag started to rise, and when it was killed, replag dropped instantly (it did not drop while the script was paused). it *was* your script. I'm not sure why, but it was.
I asked DaB to save a copy of SHOW FULL PROCESSLIST next time something like this happens, so we can investigate more closely. Right now I don't have enough information to tell you what precisely happened.
-- Daniel