How to update credentials from nodes package or core package

Can’t you renew the token within the same workflow? If it’s an HTTP Request, it would probably return 401 when the token is expired. If so, then you refresh it and then use the new refreshed token to continue the workflow.

Also, perhaps you can reference the token in the credentials using expressions? You can also access env variables from the credentials.

Just a couple of thoughts