I don't use two MX Keys with my Macbook but two different Bluetooth keyboards. MX Keys at home and an Apple keyboard in the office. I don't think that should be a problem.
I can't tell you how to do that. I think that each keyboard has a dongle that communicates with the keyboard on only that frequency. So use the 2nd dongle from the scope of delivery. But I am not sure. I'm sure the laptop can handle it.