I'd book the 3:40 and if by some luck, I cleared immigration & customs that quickly, I'd try to get on the 2:40 flight....if there's room, they will do it.
Not sure what would happen if you book the revderse, but instinct tells me you would have no problem geting on the 3:40 (unless if were full by some chance).
Bottom line - I'd book the 3:40 just for comfort and if I had to wait - there's always Jet's to hang out in.
