Heat 1 tablespoon of the butter in a Dutch oven or large deep skillet over medium-high heat. Add the shallots, celery, thyme and 1/2 teaspoon salt and cook, stirring occasionally, until starting to brown, about 5 minutes. Add the vinegar, 1/4 cup water and the sugar and cook until the water has almost evaporated.
Add the tomatoes and increase the heat to high; cook, stirring, 3 minutes. Add the lentils and 1 cup water. Bring to a simmer, then reduce the heat to medium and cook until the lentils are very soft, about 10 minutes. Stir in the mustard and cook 5 more minutes. Season with salt and pepper; discard the thyme and stir in half of the parsley.
Meanwhile, melt the remaining 2 tablespoons butter in a large nonstick skillet over medium heat. One at a time, break each egg into a small bowl, then slide it into the skillet; sprinkle with salt and pepper and cook until the whites are set, 3 to 5 minutes. Serve the lentils with a fried egg on top; sprinkle with the remaining parsley. Serve with pita if using.