@Override
	public synchronized DBHandle openForUpdate(TaskMonitor monitor)
			throws CancelledException, IOException {

		if (dbHandle != null) {
			throw new IOException("Database is already open");
		}
		if (isReadOnly) {
			throw new ReadOnlyException(
				"Read-only DB directory lock, file update not allowed: " + packedDbFile);
		}

		if (monitor == null) {
			monitor = TaskMonitor.DUMMY;
		}

		lock(updateLock, false, true);
		boolean success = false;
		PackedDBHandle dbh;
		try {
			if (!refreshUnpacking(monitor)) {
				throw new IOException("Failed to unpack/refresh database - it may be in use");
			}

			LocalManagedBufferFile bfile =
				new LocalManagedBufferFile(bfMgr, true, -1, FolderItem.DEFAULT_CHECKOUT_ID);
			dbh = new PackedDBHandle(this, bfile);
			dbHandle = dbh;
			success = true;
		}
		finally {
			if (!success) {
				updateLock.removeLock();
			}
		}
		return dbh;
	}
<code>PDBBufferFileManager</code> removes the update lock when 
the update has completed.
Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/db/PackedDatabase.java