Updated version of core Locking Middleware plugin. Can handle \Throwable, not only \Exception.
composer require lamoda/tactician-locking-middleware
use Lamoda\TacticianLockingMiddleware\LockingMiddleware;
use League\Tactician\CommandBus;
$lockingMiddleware = new LockingMiddleware();
$commandBus = new CommandBus([
$lockingMiddleware,
// ... your other middleware...
]);