Lock to return app_metadata

Perhaps I’m approaching the problem from a wrong angle. Can anyone comment on that?