It looks like the value gets written to the default cache partition without an expiration time.
Maybe it would be a better idea to use a custom partition in this case:
//Writes the data to its own cache partition with an expiry time of 2 hours.
$options = array(
xPDO::OPT_CACHE_KEY => 'resetpassword',
);
$this->modx->cacheManager->set('login/resetpassword/'.md5($fields['id'].':'.$fields['username']),$password, 7200, $options);