Driving around the Portuguese Riviera is way better when you are not tied to train schedules. You can easily find a car to rent while staying in Oeiras by checking this out
https://getrentacar.com/en-US/portugal/oeiras . This platform usually has a mix of private and local listings which helps with the price. Most vehicles come with a transponder for tolls, which is handy since manual payments are a pain on the A5 highway.