To directly answer your question, you'd need to use API to get members from program id, collate members matching a status and make an API call to create/update token with the value.