$db->query_write("UPDATE " . TABLE_PREFIX . "setting SET value = 'foobar' WHERE varname = 'banned_users'"); require_once(DIR . '/includes/adminfunctions.php'); build_options();
You could also just directy change the data in table datastore, but you must keep in mind that it theoreticaally could be changed back at any time if it's not written to table datastore as well.
Also keep datastore caches in mind.