Hi, Li,
I think you can use a bus switch to implement the function.
I suppose that NXP does not have bus switch IC, you have to get from Third party.
For example, pls refer to the link for Bus Switch.
Digital Bus Switch Selection Guide (Rev. A)

You can connect the RX pin of USART of LPC812 to 1B2, connect TX of USART of LPC812 to 1B1, connect S to a GPIO pin of LPC812 so that you can control the selection, connect /OE to GND or another GPIO, whatever.
When the 1B2 is selected, you can receive data, when the 1B1 is selected, you can transmit usart data.
Hope it can help you
BR
XiangJun Rong