public function aroundLockProductsStock(
        \Magento\CatalogInventory\Model\ResourceModel\Stock $subject,
        \Closure $proceed,
        $productIds,
        $stockId
    ) {
        if (empty($productIds)) {
            return [];
        }
        /** @var \Magento\Framework\DB\Adapter\AdapterInterface $conn */
        $conn = $subject->getConnection();
        $itemTable = $subject->getTable('cataloginventory_stock_item');
        $productTable = $subject->getTable('catalog_product_entity');
        /** @var \Magento\Framework\DB\Select $select */
        $select = $conn->select();
        $select->from(['si' => $itemTable]);
        $select->join(['p' => $productTable], 'p.entity_id=si.product_id', ['type_id']);
        $select->where('product_id IN(?)', $productIds);
        $select->forUpdate(true);
        /* MOBI-375 add filter by $stockId */
        $select->where('stock_id=?', $stockId);
        /* select data */
        $result = $conn->fetchAll($select);
        return $result;
    }