That is easy
PHP Code:
<?php
error_reporting(E_ALL & ~E_NOTICE);
if (!is_object($DB_site))
{
exit;
}
$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET usergroupid = 2 WHERE usergroupid = 677 AND lastactivity < " . (TIMENOW-X*86400));
log_cron_action('Inactive VIP Users reset to Registered', $nextitem);
?>
Replace X with the number of days, save this a a php-file in includes/cron, create a cron-job for it (to be run once/day for example) and you're done.