Casting lots in the ancient world was more akin to drawing names from a hat than a vote. The names of the candidates would have been written down (or something done to mark the lots), and then would be drawn from a vase, urn, or other large item. They might have been dumped out with the one landing first being named the choice.
However, research has also shown that casting lots in the ancient world could be a multi-cast affair. The lots would be cast repeatedly until the same lot fell out three times in a row. Only then was the lot seen as showing God's will. If the lots were cast ten times without a three-in-a-row, then it was deemed that God had selected neither choice.
It should be noted that the Apostles did pray that God show them his choice before they cast lots.