Iterate over authorized applications instead of tokens to avoid multiple rows for the same authorized app.