How to store data in a config parameter from a script

I want to store data like an access token and the exp. time in an config paramter so I don't have to request a new token for every call.

I know I can reach the parameter with somethign like: 

Dim paramExp = Session.Config.GetConfigParm(tokenExpPath)

But this property is read only so I cannot put a new value in it with this method.

Can somebody provide me a script example of how to retrieve a config parameter and put a new value in it from a script?