Using a vegetable slicer or a sharp chef's knife, slice the cucumber crosswise into thin slices (ideally 1/16 in/2mm, or as close to that as you can get).
Place the slices into a 1-pint/480ml mason jar. Add the mustard seeds to the jar, if using.
Stir together the vinegar and water in a heatproof measuring cup. Pour this mixture into a saucepan and bring to a simmer, then stir in the sugar and salt. Alternatively, microwave the water and vinegar for 2 minutes, then stir in the sugar and salt until they're dissolved.
Pour the hot pickling liquid over the cucumber slices in the jar. Submerge them completely.
Allow the slices to sit at room temperature for 30 minutes. Use right away, or cover the jar tightly with a lid and store in the fridge for up to 2 weeks.