Refactor createOrUpdate method in MongoChannelStore to extract methods and make code more readable