Take a look at other queries written in the vbulletin files and you should see the proper format to do that. Just doing a quick search in my vb directory for UPDATE gives me this (and tons of others) as an example:
PHP Code:
$vbulletin->db->query_write("
UPDATE " . TABLE_PREFIX . "user
SET reputationlevelid = $sql
");
Using that as an example, you should be able to write out yours.