You should throw them out.
Mussels that don't open were quite possibly dead and decomposing for an unknown period of time prior to cooking.
You don't want to take a chance here.
Just in case future readers don't know, mussels, clams, and other in-shell shellfish are still alive when you buy them, and they should be still alive when you cook them.
cooking.stackexchange.com/users/60/hobodave
In the future, I would recommend the following: When washing the mussels before cooking, if any are slightly open try gently closing them.
If they react by snapping closed themselves or they stay shut, it means the mussels are alive and well.
If instead they react by immediately popping back open, throw them out (they are dead).
I've found that the majority of the dead mussels are slightly open before cooking; they rarely are completely, tightly closed.
Using this method, when you actually cook the mussels, you have a reasonably good idea that they are all alive and therefore safe to eat, regardless of whether or not they open all the way during cooking.
After cooking there will likely be none that are closed, but if there are, there will likely be few and you can discard them if you like.
cooking.stackexchange.com/users/5600/ESultanik
When mussels don't open when cooked, it means that they were dead before you cooked them.
Don't eat them you risk becoming very very sick.
cooking.stackexchange.com/users/None/
A friend of mine (professional cook) told met to steam mussels extra hot, lid closed.
In about 5' they should be open and done.
They are done when they open.
Don't leave them cooking any longer than necessary as they'll toughen up.
cooking.stackexchange.com/users/641/BaffledCook
As far as I know, if you spray fresh live mussels with cold water they will open slightly.
If they don't open, throw them out.
cooking.stackexchange.com/users/7399/Phil Peace
I bought 1/2 pound of mussels and cooked them in a cast iron skillet with a little white wine and some shrimp stock on boiling heat.  Almost all of them opened after about 15 minutes, some did not. The ones that opened were done perfectly, and those were the ones I served.  Still, in the future - should I just throw away the rest, or would a few more minutes in the skillet be in order?
How do you know when mussels are done?
cooking.stackexchange.com
<food-safety><shellfish><mussels>
cooking.stackexchange.com/questions/1168
cooking.stackexchange.com/users/293/Tim Post
Mussels that do not open when cooked were probably already dead and decomposing for an unknown length of time. Before cooking, try gently closing mussels that are slightly open, and spray closed mussels with cold water — they should open slightly if they are alive. Mussels that don't open when cooked should be thrown away. Try to spot any open ones when washing and try to close them to see if they are still alive.
If mussels don't open when cooked, it means they were already dead and should not be eaten. When washing, try closing any mussels that are open to see if they are still alive. You can also spray them with water to see if they react.