have multiple serial nodes setup with a selection of settings & route messages to the desired serial node based on the value set in the MQTT message
OR
save the MQTT value to ENV VARS & use ENV VARs for the serial port settings (NOTE: env vars are only read on start up so this solution would require you to restart node-red after a change)