Abraham was 75 when the promise was given (Genesis 12:4). 25 years later, he begat Isaac at 100 years of age (Genesis 21:5), Isaac begat Jacob when he was 60 (Genesis 25:26) and Jacob went to the land of Egypt when he was 130 years of age (Genesis 47:9). Up to this it makes 215 years, after this it took 430 years when Israel left Egypt and got the “Law” at Sinai (Ex 12:40). Totally, it makes 645 years. How should this verse be understood?
ESV - 17 This is what I mean: the law, which came 430 years afterward, does not annul a covenant previously ratified by God, so as to make the promise void.
For follow-up discussion and general commentary on the topic. Comments are sorted chronologically.
This verse in Galations by Paul is just quoting Genesis 15:13. Why get all hung up on the numbers? The Bible is God's Holy word I don't need to understand every single moment of time. But God said it, I believe it and that is enough for me!
Then He said to Abram: “Know certainly that your descendants will be strangers in a land that is not theirs, and will serve them, and they will afflict them four hundred years. And also the nation whom they serve I will judge; afterward they shall come out with great possessions. Genesis 15:13-14 NKJV
Now the sojourn of the children of Israel who lived in Egypt was four hundred and thirty years. And it came to pass at the end of the four hundred and thirty years—on that very same day—it came to pass that all the armies of the Lord went out from the land of Egypt. Exodus 12:40-41 NKJV
And this I say, that the law, which was four hundred and thirty years later, cannot annul the covenant that was confirmed before by God in Christ, that it should make the promise of no effect. Galatians 3:17 NKJV
Israelites sojourned in Egypt for 439 years (to the day) and afflicted (enslaved) for the last 400 years.
Thus, the Israelites lived peacefully in Egypt for 39 years before they were enslaved by the Egyptian pharaoh.
The promise to Abraham was that his descendants would be afflicted 430 years and then delivered and they were.
Taking Galatians 3:17 out of context leads to confusion.