A used car with only one key is a detail to resolve before delivery. It would not automatically take a good car off my list, but I would want a clear answer about the second key before deciding what the car is worth to me. Waiting until you are handed the keys turns a negotiable part of the purchase into an unfinished errand.
Start with a straightforward question: how many working keys are included in this sale? The number the car had when it was new does not tell you what is coming with this purchase. If the dealer says the previous owner may still have another one, treat that as something the dealer is trying to recover. It is not yet a key you can take home.
There is also a difference between a missing key and a promise to provide one. A car offered with one key gives you a cost to evaluate. A car sold with a promise of two gives the dealer something to deliver. Mixing those situations together creates most of the frustration.
Price a working replacement
Get a quote for the exact vehicle, using its VIN. Have the shop explain what its total includes: the appropriate key or fob, any cutting and programming required, and applicable labor and taxes. A price for a loose part on a website is not a complete quote for a working spare.
The replacement also needs to do what you expect. If you want the same functions as the supplied key, say so when requesting the quote. A lower price for a different solution can be useful, but it should be a deliberate choice. Test the supplied key and the replacement's agreed functions before treating the job as finished.
For a simple hypothetical, suppose two otherwise comparable cars cost $21,000 and $21,300 before the same taxes and fees. The first has one key; the second has two. If your actual complete replacement quote for the first car were $450, its apparent $300 advantage would disappear. Those numbers are only an illustration. The useful number is the quote for the car you are buying.
That does not mean a dealer owes you a discount equal to whichever quote you obtain. It means you can explain your offer with a real cost. The dealer may prefer to supply the key, contribute toward it, or keep the price where it is. You can then judge the whole purchase instead of arguing about an unknown expense.