I expect a token to get the latest value from the database.
However, using the following code, in this case, the value of $points will not change when the site is being refreshed. (Cache is not enabled)
//Get data:
global $user;
$user_fields = user_load($user->uid);
$data = array('node' => $node);
//Token replace:
$points = token_replace('[current-user:field_points]', $data);
$userid = token_replace('[current-user:uid]', $data);
//generation of random number:
$points_new = mt_rand(0, 999);
//Output:
print $points . '<br>';
print $points_new . '<br>';
//Update Field with random number:
db_update('field_data_field_points')
->expression('field_points_value', ':field_points_value', array(':field_points_value' => $points_new))
->condition('entity_id', $userid)
->execute();