You have a couple of problems with that code. Try this:
Code:
$cutoff = TIMENOW - (60 * 60 * 24 * $vbulletin->options['user_contact_time']);
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "thread
SET user_contact = 'anything'
WHERE dateline <= $cutoff
");
As for where to put it, it might work at global_start, but I don't think you want it to run every time anyone accesses any page. You could use cron_script_cleanup_hourly and have it run once per hour, if that works for you.