Contact lenses could melt in a tanning bed if you're not using other eye protection over the contact lenses to protect them from the UV exposure.
But if that happened your eyes would be cooked too bad and your skin would also be cooked too bad before it melted the contact lenses.
However it's recommended that you remove contact lenses from your eyes before using a tanning bed to prevent damage to the contact lenses.
If you do opt to wear your contact lenses in the tanning bed make sure you wear adequate eye protection to protect the contact lenses.
I always just remove my contact lenses before getting into the tanning bed and then put them back in when I get out of the tanning bed.