With a layover of 4 hours, you have enough time to go landside to buy an Octopus card after your 5:15am arrival. I think the Airport Express station opens at 6am. I don't know if that is worth your time going through immigration twice and security once just for that card though.