After any button press. When any button is pressed, it triggers a monostable set to 30 milliseconds. The trailing edge of that pulse clocks the latches, and any buttons pressed at that time are latched as ones and drive relays. Once a button is held down and the 30 ms has passed, al buttons are ignored until all buttons are released and the monostable resets for the next event. To shorten the recovery time there should be a small diode added in parallel with R1. I'll update the schematic.
While there is a chance, technically, of a non-unique output, the odds are extremely low. There is another version of this circuit without the full monostable, just a transistor as an edge former, and it works just fine.
Note - the parts values and IC part numbers are suggestions, parts in my schematic library. Feel free to use different gates and latches. I like resistor networks but that's just me; individual resistors will work just as well.
ak