Note: If you go to Core Services UI → Access Management → Organization → <your org> you will see the configurable session timeout. The TTL specified there is the time of validity of the token.

If your organization has external identity configured, you can use the user account existed before federation, or ask your external identity administrator to get a SAML token then send to https://anypoint.mulesoft.com/accounts/login/receive-id to get access_token.
2) use the access token to get the Org ID