public function isAccessible(AcquirerInterface $acquirer, ResourceInterface $resource)
    {
        if (!$resource->isLocked()) {
            return true;
        }

        $lock = $resource->getLock();
        if ($lock instanceof ExpiringLockInterface and $this->isLockExpired($lock)) {
            $this->release($lock);

            return true;
        }

        return $lock->getAcquirer()->getIdentifier() === $acquirer->getIdentifier();
    }