Writing to a custom field in PHP
It should be something as simple as

$account = user_load($GLOBALS['user']-&gt;uid);
$edit['field_keys_available'][LANGUAGE_NONE][0]['value'] = 'new value';
user_save($account, $edit);


The comments in the user_save() docs have some more details and examples.