Your first sentence is not correct because you are using the past tense of buy (=bought) to make a wish about the future.
The second sentence is ok because although would is a past tense modal verb we are allowed to use it to talk about a wish for the future.
Here is another example:
I wish it would rain tomorrow.
Another past tense modal that can be used to express a wish about the future is could Here is another example:
I wish you could help me with my exam tomorrow.
I hope that helps a bit.
Some help from British Council website