"Things that can't go
on forever, don't." (1)
I'll begin with the answer: At best, we are almost out of time. Without dramatic change here and now, extinction due to environmental collapse, sometime in the next century is highly probable. Now, the explanation.
Anatomically modern humans have existed on the planet for at least 200,000 years. Given this reality, there is no inherent reason for humans not to continue to exist indefinitely. However, this is not to say that because some humans can exist, that therefore all humans alive today, and in the near future can exist. It is not to say that industrial civilization, which has allowed humans to exist in such vast numbers can continue into the future. This is because it can't.
Agricultural civilizations have existed for nearly 10,000 years. Clearly, they are cyclically sustainable. Eventually, any such civilization will exhaust its soils, and/or will fall victim to natural changes in climate--particularly rainfall. (2) Invaders then take the opportunity to plunder. After several centuries, the soils, if exhausted, will regenerate, the rains, if absent, will usually return. Civilization can then renew itself. In fact, we have a name for this long term process: history.
Beginning about 500 years ago, humanity took a new course. The world was understood to be inert matter, subject to natural, physical laws. (3) By means of science and reason humans could come to understand and also dominate nature. We were central, nature peripheral.
This worldview underlay the subsequent industrial revolution. It was central to the doctrine of industrial capitalism as laid out by Adam Smith. It was also central to Marxism as articulated by Karl Marx. (4)
The 20th century saw a fierce competition between an American centered variant of industrial capitalism and a Russian version of Marxism. America's victory in the Cold War was capitalism's victory. Yet humanity would have been better served if neither materialistic doctrine had prevailed.
Instead industrial capitalism became supercharged. Russia's demise led to the doctrine of "There Is No Alternative" (TINA), espoused by Reagan, Thatcher, Greenspan and many others. In practice, this became the doctrine of neoliberalism. Pure capitalism in which EVERYTHING is commoditized. The almighty market became the ultimate arbiter of everything.
Globalization is the extension of neoliberalism across the planet. The various so called "free trade" trade agreements are designed to place the short term interests of large multinational corporations above all other human and natural interests. Short term profit uber alles.
Given this reality, I must note that while the various struggles currently underway across the planet to counter this American dominated economic imperialism are just, as people have a right to personal and national freedom, they do nothing significant to avoid humanity's onrushing ecological disaster. This is because at root, all major competing approaches to organizing national and global political economies are materialist. This reality is our species' deep problem.
We have organized ourselves according to a materialist paradigm, predicated upon treating the Earth as an inert source of raw materials. Our lands, waters, and skies are exploited as open sewers for the dumping of often toxic wastes consistent with maximization of profit in the shortest possible time frame. No regard is given to any living creature save with respect to its utility in maximizing short term profits.
Further, such a system inherently dehumanizes people as well. Ever growing concentration of wealth into fewer and fewer, generally ever more sociopathic hands is not only occurring, but is visibly accelerating.
We have blown past numerous planetary limits simply because the inner logic of this system is that there are no limits. As things stand now, it is possible that humanity, even possibly all complex life on Earth is already doomed to extinction. Ecologist Guy McPherson makes just this case at some length on his blog. Is he correct? I do not know. However, I do know that if we simply continue with business as usual, it will not be long before he is.
Likely the most critical failure point for the Earth's continuing ability to sustain human life is the impending sublimation (transitioning directly from an ice to a gas) of methane hydrates currently frozen underneath the Arctic Ocean. For readers who are unfamiliar with this issue see HERE and also HERE.