You don't say what version of avast or zone alarm you are using?
avast! shouldn't have any effect on the autolock, all it could do is if a file is launched to autolock, if there were a virus issue avast would warn, but it can't and doesn't block.
This may well be a coincidence, I would suggest that you download the latest version of Zone Alarm, go off-line, uninstall ZA, boot and install the latest version.