After purchase, oysters should be kept cool (3-5°C) in their box, never in water. Oysters can survive out of water for a relatively long time. Oysters can be kept until the best before date stated on the packaging. On average this is 9 days. There should always be pressure on the package to keep the oysters closed. That is why it is wise to always put something heavy on top of an opened package, so that the pressure on the shell is maintained.
To check whether the oysters are dead or alive, you can knock two oysters together. If the sound is hollow, at least one of the oysters is dead. Check both oysters with another oyster to see if they are alive. If the sound sounds like two stones hitting each other, both oysters are alive. Keep one to check the other oysters because now you know one is alive. If there's a hollow sound, the other one must be dead. If you find dead oysters, throw them away.