Use WD-40 only to dissolve the old stuff, then thoroughly wipe it all off. Do not -- repeat, do not -- use WD-40 as a lubricant for that drive.
I have used automobile chassis lube in the past. I don't know what that sewing machine stuff looks like, but if it has a paste consistency, it's almost certainly a better choice than WD-40.
I have used automobile chassis lube in the past. I don't know what that sewing machine stuff looks like, but if it has a paste consistency, it's almost certainly a better choice than WD-40.