The visa for the lastest entry no mattmer whether it is valid or not. In your case, it is the second one.