The game will not let you activate second treasury if you don't meet requirements (meaning if you are a duke or don't have enough villages as a king), but as soon as you start the process of hiding the active treasury the option will be available.
If you are a king, treasures that were in that treasury will automatically move to other treasuries if there is enough space (I believe only to king's treasuries, treasuries of dukes are excluded, but I'm not sure). If there is no room treasures will stay in the same village like a tribute in some sense, meaning they can be stolen, all of them, not just 30%, and they will not generate no influence or victory points.
If you are a duke, treasuries will go in tribute fund and the king who covers the territory will collect them (most likely not your king) with tribute. They will not move to new active treasury.
This is my understanding, I'm not sure about it actually. If someone corrects it or confirms, that will be appreciated.