In 800 million years, the Sun will expand and heat up enough that all life on Earth will die, and the oceans will boil away. That's about 3.2 billion years before Andromeda collides with the Milky Way. Hopefully we'll have found another planet long before either of those events become a problem.
I kinda doubt humanity will still exist in 800 millions years. Either we'll all kill ourselves in some nuclear wars, or we'll "kill" the planet before we can even leave it. And if none of those happen, we will have evolve so much we probably won't even look like humans anymore.