MySQL Store Procedure - Setting AUTO_INCREMENT value
Use a prepared statement

DELIMITER $$
CREATE DEFINER=`dbcomexuser`@`%` PROCEDURE `clearance_imp`(IN CAPIfilename VARCHAR(12))
BEGIN

DECLARE `_rollback` BOOL DEFAULT 0;
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET `_rollback` = 1;
DECLARE _refID INT DEFAULT 0;

START TRANSACTION;

SELECT MAX(imp_id) + 1 INTO _refID FROM temp_imp;

INSERT INTO filenamedt (filename, filedate) VALUES (CAPIfilename, now());

INSERT INTO imp__description (imp_id, imp_description) (SELECT imp_id, TRIM(descricaoProduto) FROM temp_imp);

TRUNCATE TABLE temp_imp;

SET @sql = "ALTER TABLE temp_imp AUTO_INCREMENT =  ?";
PREPARE stmt1 FROM @sql;
SET @a = _refID;
EXECUTE stmt1 USING @a;
DEALLOCATE PREPARE stmt1;
IF `_rollback` THEN
    ROLLBACK;
ELSE
    COMMIT;
END IF;
END$$
DELIMITER ;


If you are using workbench and create Stored procedure you don't need the DELIMITER