def METHOD_NAME(cmd, token, repo):
    repo = repo_url_to_name(repo)
    secret_store = _get_github_token_secret_store(cmd)
    cache = secret_store.load()
    for entry in cache:
        if isinstance(entry, dict) and entry.get("value") == token:
            if repo not in entry.get("repos", []):
                entry["repos"] = [*entry.get("repos", []), repo]
                entry["last_modified_timestamp"] = datetime.utcnow().timestamp()
            break
    else:
        cache_entry = {"last_modified_timestamp": datetime.utcnow().timestamp(), "value": token, "repos": [repo]}
        cache = [cache_entry, *cache]
    secret_store.save(cache)