There's a third solution to your situation: keep your current job and take freelance/remote projects. You make way more money, you have things to do and show, and you can always decide to leave this position if it stagnates.
It happened to me and after going through similiar feelings and almost quiting I started learning everything I wanted to but never had the time. Then I got involved with a local startup and now I have two jobs.
Never worked on the second job during company time for the first but being able to de-engage and saving the mind for the second job makes it possible.