You don’t need to equip the key or even have it in your hotbar to use it. Just keep one in your inventory and it will unlock any gates in the swamp. Swamp keys have no use other than unlocking Sunken Crypts, unlike the hard antlers that you used to make an Antler Pickaxe.
The swamp key also has no use outside the swamp. There are no other locked items in the game that can be unlocked with a swamp key.