I agree with the others that the sentence with “would” makes more sense, as winning the lottery is rather unlikely. However, that sentence (sentence number 1) has a mistake — it should be “if I happened to win the lottery, I would….” In the spoken language, the -ed would be inaudible, but we definitely need to write it. Sentence 2, on the other hand is grammatically correct, although it suggests a relatively high probability of winning.