Since this is your return flight you will have already had your passport info scanned into the system so should be able to do online check-in with UA. If you don't already have the UA app on your mobile phone, get it and do OLCI 24 hours before departure. You need to be at the gate in LIS NLT 30 min before scheduled departure, which should be doable with only carry on luggage. (That said, I'd agree with the suggestion to take the train)