$DB_site->query("UPDATE thread SET open=0 WHERE dateline<=$log_lockdate AND forumid=X");
Replace X with your forumid you want the auto-lock..
Not tested, first try in a test board! It has SQL query that wil make modifications in the records of your db, so do not apply to your real board without testing it in a test board..
The auto-lock will be triggered whenever someone creates a new thread in your board so do not expect the hack to work if someone does not create a new thread for a few days..