为什么这个WordPress数据库查询不起作用?

Can somebody tell me why the following code is not working as I intended it to. I want the $token to be inserted into ami_st_token_aut of my wp_users field where the id is the id of the user currently logged in.

$token = $_GET['token'];
$services = $_GET['services'];
global $current_user;
get_currentuserinfo();
$wpdb->query("UPDATE $wpdb->users SET ami_st_token_aut = ".$token." WHERE ID = ".$current_user->ID."");

Check the $current_user->ID if it is not empty.

If the field type is to store string values enclose the value in quotes for ami_st_token_aut

$wpdb->query("UPDATE $wpdb->users SET ami_st_token_aut = '".$token."' 
             WHERE ID = ".$current_user->ID."");