Many travelers assume it’s fine to check in a few hours before a flight, maybe even while en route to the airport. But that assumption can be costly.