Well, in a way, the epic of Gilgamesh can be seen as a critique of what would eventually be capitalism, but not in the usual way, as its criticism of power dynamics is addressed to the ruling class (represented by the protagonist Gilgamesh).
This quote is spoken by Siduri, a regular barista, to a man who is 2/3 god and 1/3 human, the king of the biggest city in the land, rich beyond riches, famous and accomplished, has rapey tendencies, killed people, deforested the land, seeking immortality to cure his depression after having lost his totally-not-lover the beastman Enkidu (really the Epic is just omegaverse doomed yaoi).
She's telling him that by lusting for impossible powers, he has forgotten to live his life. The wealthiest can try all they want to become gods, they will always be human and die like the rest of us. Only they can decide whether they will spend their lifespan enjoying a good simple life, or dedicating it to exploiting, colonizing, ruining others lives. One outcome tends to bring satisfaction, whereas the other will only leave them thirsting for more in their quest for an unattainable goal.
Alas, capitalism rewards those who follow the doomed path.