We faced a similar issue.
In our case it was that we called a method which was doing the update in the mongoDB but not waiting till it finishes.
With this the problem was that the mongock Job already considered the method to have finished and released the lock.
In the method above we were therefore trying to write to mongoDB without having a lock which caused the mentionned error.