private static function update_cookie_expiration($type, $expire_now=false) {
	$params = self::get_cookie_settings($type);
	$value  = session_id();
	$expire = (time() + $params['duration']);
	
	if ($expire_now) {
		$value  = null;
		$expire = (time() - 604800); // one week ago
	}
	
	setcookie($params['name'], $value, $expire, $params['path'], $params['domain'], $params['secure'], $params['http_only']);
}