public static function lockTables($table = NULL, $blockType = 'WRITE')
    {
        $sql = "LOCK TABLES ";
        if ($table === NULL) {
            $sql .= self::tableName() . " $blockType";
        } else {
            $tmpSql = '';
            foreach ((is_array($table) ? $table : [$table]) as $key => $value) {
                $tmpSql .= empty($tmpSql) ? '' : ', ';
                $tmpSql .= "$value";
                $tmpSql .= is_string($key) ? " $key" : '';
                $tmpSql .= " $blockType";
            }
            $sql .= $tmpSql;
        }
//        die(Yii::$app->db->createCommand($sql)->rawSql);
        Yii::$app->db->createCommand($sql)->query();
    }