diff -Nuar a/vendor/magento/framework/Lock/Backend/FileLock.php b/vendor/magento/framework/Lock/Backend/FileLock.php
--- a/vendor/magento/framework/Lock/Backend/FileLock.php
+++ b/vendor/magento/framework/Lock/Backend/FileLock.php
@@ -91,6 +91,7 @@ class FileLock implements LockManagerInterface

             while (!$this->tryToLock($fileResource)) {
                 if (!$skipDeadline && $deadline <= microtime(true)) {
+                    $this->tryToUnlock($fileResource);
                     $this->fileDriver->fileClose($fileResource);
                     return false;
                 }
@@ -124,6 +125,7 @@ class FileLock implements LockManagerInterface
                 } else {
                     $result = true;
                 }
+                $this->tryToUnlock($fileResource);
                 $this->fileDriver->fileClose($fileResource);
             }
         } catch (FileSystemException $exception) {
