ModeShapeLock lock = new ModeShapeLock(lockNode, systemSession);
NodeKey lockedNodeKey = lock.getLockedNodeKey();
if (lock.isSessionScoped() && activeSessionIds.contains(lock.getLockingSessionId())) {
//for active session locks belonging to the sessions of this process, we want to extend the expiration date
//so that other processes in a cluster can tell that this lock is still active
MutableCachedNode mutableLockNode = systemSession.mutable(lockKey);
Property prop = propertyFactory.create(ModeShapeLexicon.EXPIRATION_DATE, newExpiration);
mutableLockNode.setProperty(systemSession, prop);
//reflect the change in the expiry date in the internal map
this.locksByNodeKey.replace(lockedNodeKey, lock.withExpiryTime(newExpiration));