Melt 2 Tbsp. oil in a skillet over medium heat and sauté onion for 3-4 minutes until browned. Add in the carrots and celery (optional), and cook for another 3-4 minutes. Add the ham to the mixture and heat through, for 2-3 minutes.
In a large pot add the stock; stir in the onion, carrots, celery, and ham mixture. Add the undrained beans. Season to taste with celery salt. Add fresh thyme.
Bring soup to a boil, reduce heat to medium-low, and simmer for 10 minutes.
Serve hot and garnish with fresh thyme before serving!