No the second upvote does not overwrite the first one
Infact, there wont be any second upvote
The user already upvoted your post be it trail or manually, the only way that upvote could or would be changed, is if the user decides to unvote that said post making his/her vote zero on that post and then upvote you again.
Mind you, the three actions made above requires the user using his/her voting power
That is, UPVOTE, UNVOTE and UPVOTE
So unvoting a user after a upvote has been made only to upvote again is not that wise of a decision unless the user see it fit to increase or decrease that post reward.
After all, this is a free system and we all have the right to do as we see fit with our steempower
There are a couple of ways this can happen and is normally by mistake.
If a user upvotes a post and he /she has a vote on a trail that also lands on the same post the second vote wont vote as it wont accept a second vote.
If I am on your post and I vote for it and something happens and doesn't show me it has gone through straight away and I re click but it in fact has voted already it actually removes it. I would then have to vote again to register the vote. This has happened q few times tome which is frustrating as it still goes off your voting power and is just wasted.
This would mean voting-unvoting (cancelled it out) and voting again which is one vote..
This depends on what service you are using. I know for a fact that SteemAuto skips already upvoted post but for some services, the first upvote is overidden by the second upvote. Like if you manually upvoted someone at 100% and then minutes after the trail upvotes it at 50%, then the final upvote is at 50%.
Source: SteemAuto FAQ
You can't get two votes from the same person on the same post because the programming of steemit doesn't allow it. After a person has upvoted a post and they click on upvote again, a pop up would come up telling them that they had already upvoted the post
On some DApp, should the same person click on upvote a second time, a message would pop up asking him/her if he wants to remove his vote from the post. So there's no way a person can upvote a particular post twice on steemit because the steemit algorithm doesn't allow it