Race Condition With Deferred Scripts
When executing deferred scripts, the script is given 10 seconds to timeout before running another batch. However, within this 10 seconds, it's likely another user will make a request and load the same batch as well. A lock needs to be placed on deferred scripts so that they are ignored while a batch is already in progress. Otherwise database errors or corruption might occur when the same batch is run simultaneously.