Assuming you aren't arriving internationally (customs), 40 minutes should be fine, if things are running on time. Don't even think about the terminallink van. Stay airside and take the Skylink. Station to station is 10 minutes max, thains run every 2 minutes. Add a few minutes to walk gate to station & vice versa, and it should take no more than 20 minutes gate to gate.