Season the chicken thighs with salt and black pepper.
Heat ½ tablespoon olive oil in a pan over a medium heat and fry the chicken for 5 minutes each side, until golden.
Remove from the pan to a plate.
Add the other ½ tablespoon olive oil to the pan and cooked the onion for 5 minutes until soft.
Add the crushed garlic and fresh thyme and cook for 1 minute.
Stir in the flour.
Add the stock, milk and mustard and stir.
Chop the chicken into bite size pieces. It will still be a little raw in the middle, don't worry, it will finish cooking in the sauce.
Add the chopped chicken to the sauce and simmer for 30 minutes.
Pour into a 17 x 26cm (6.7" x 10") dish and cool. Once cool, add the chopped ham and stir to combine.
Preheat the oven to 200˚C fan /220˚C / 392˚F convection / 428˚F
Take the pastry out of the fridge 5 minutes before you want to use it.
Dust a board or clean work surface with flour, then roll the pastry out to 3mm - 5mm (0.11" - 0.19") thick.
Optional step: cut strips of pastry 1 cm (0.4") wide. Brush the tops of your baking dish sides with egg and cover with pastry strips. Brush these pastry strips with egg and lay the pastry on top.
Lay the pastry over the chicken filling and using a sharp knife, cut around the egdes of the dish, leaving a slight overlap.
Use any scraps of pastry for decoration, fixing them to the top with a little beaten egg or milk.
Cut a couple of slips in the top of the pastry to let the steam out.
Brush the top of the pie with beaten egg or a little milk and place into the oven for 30 minutes, until the pie is golden brown on top and bubbling at the edges.