Adjunto propuesta Class Lock:
antes de establece el valor
/**
* Get Methodos Class Lock
* @returns {error}
* @see Class Lock:
* https://developers.google.com/apps-script/reference/lock/lock
*/
const classLock = LockService.getDocumentLock();
/* https://developers.google.com/apps-script/reference/lock/lock */
classLock.waitLock(4000); // 4 seconds
Después de establecer el valor
/* Releases the lock, allowing other processes waiting on the lock to continue */
classLock.releaseLock();
Referencias:
Lock Service
Class Lock