Create a new key
Create a new API key with the same access as the key you intend to rotate.
Update the stored client id and secret
Replace the previously stored client id and secret with the values for the new key.
Wait for (or force) existing uses of the key to retrieve the new values
Any services that hold the id and secret in memory will need to refresh the values, either by waiting for a pre-configured expiry duration or manually restarting the process.