public void unlockOldLocks() {
        taskContextFactory.current().info(() -> "Removing old cluster locks");
        final long oldTime = System.currentTimeMillis() - TEN_MINUTES;
        for (final Lock lock : lockMap.values()) {
            if (lock.refreshTime < oldTime) {
                // This will only remove the lock if it is still the same lock
                // instance. It should be but there is a slim chance that the
                // owner has released the lock in the mean time which is
                // acceptable.
                final boolean success = lockMap.remove(lock.clusterLockKey.getName(), lock);
                if (success) {
                    error("unlockOld() - Removed old lock", null, lock);
                }
            }
        }
    }
Every 10 minutes try and unlock/remove any locks that we hold that have
not been refreshed by their owner for 10 minutes.
stroom-cluster/stroom-cluster-lock-impl-db/src/main/java/stroom/cluster/lock/impl/db/ClusterLockClusterHandler.java