Heat the oven to 350°F (175°C). Line a 9-by-13-inch baking pan (23-by-33-cm) with parchment paper, leaving an overhang on the long sides for easy lifting.
Beat the softened butter and granulated sugar in a large bowl until smooth and creamy, about 2 minutes. Beat in the egg yolk and vanilla until combined.
In a separate bowl, whisk the flour, 1/4 teaspoon salt, and baking powder. Add the dry ingredients to the butter mixture and mix on low speed just until a soft, crumbly dough forms. Do not overmix.
Press the dough evenly into the prepared pan. Prick it all over with a fork, then bake for 18 minutes, until the surface looks set and the edges are just beginning to turn pale gold.
While the crust bakes, stir together the walnuts, brown sugar, honey, melted butter, cinnamon, remaining 1/4 teaspoon salt, and lemon zest, if using.
Remove the pan from the oven. Carefully spread the apricot preserves over the hot crust, leaving a small border around the edges. Sprinkle the walnut mixture evenly over the jam layer.
Return the pan to the oven and bake for 10 to 12 minutes, until the nut topping is bubbling and fragrant and the edges are golden brown.
Cool the mazurek completely in the pan, at least 45 minutes, so the topping can set. Use the parchment overhang to lift it out, then cut into 16 small rectangles or squares.