MySQL Trigger IF Statement
After some experimentation, I figured out that the code works if I don't prefix my variable names with a '@':

DECLARE D_Type varchar(1);
DECLARE D_TableId tinyint;
DECLARE D_IsActive bigint;
SET D_Type='U';
SET D_TableId = 2;
SET D_IsActive = (SELECT IsActive FROM AuditDB.ExportLogTableDefinition WHERE TableId=D_TableId);
IF D_IsActive=1 THEN