It may help if you tell us what equipment you have, and what you are trying to achieve.
Though not good practice, as it puts unfair strains on the machine, a keyway can be cut using a lathe as a makeshift shaper. The tool is held in the tool-post as normal but on its side, so the cross-slide controls the depth of the keyway. The saddle is then racked back and forth to produce the cut.
An alternative, if the purpose is to match the gear to a shaft with a bigger keyway, is one I used where the keyway in a wheel hub is slightly wider than the axle keyway. I made a key stepped across its width, so the narrower half fits the shaft keyway, and the wider half fits the hub.
This may be the better way here than trying to modify a slot 60mm long, accurately. Certainly easier.