According to one website I found, it has a lot to do with the temperature. At 120 degrees Fahrenheit, no more than 2 days. At 50 degrees Fahrenheit, up to 10 days. The standard answer, though, is...
Cardisoma armatum is land crab which could live out of water without problems. But necessary is high level of humidity and shallow pot with water for drinking and washing gills too.