Checking a condition before updating q document in a single threaded manner

Hello, @Vasu_Bathina! Welcome to the community! :wave:

You can assign to each update operation the modificationsRequested timestamp and simply do not update documents that have modificationsRequested with a higher value. This solution is described with example in this topic.

UpdateOne method returns update result on which it is clear if the doc is updated, or not. Then act accordingly.