WD40 evaporates in a week. Try spraying it on a plastic bag.
About the thinnest 1 year persistent oil is what we use on Hammond organs. No zinc or aluminum or other metal additives, no detergent to suck moisture out of the air, nothing but mineral oil It is about viscosity 5w sae, or sus 24. Turbine oil from industrial suppliers is about the closest you can buy, like Mobil DTE, but DTE has some long organic chemical as a preservative. In the US mineral oil laxative from the pharmacy or grocery store won't have any metal and is about the right viscosity. Metal is a food additive, so they would have to list it under USDA regulations if it had any. Mineral oil laxative has tocopherol, or Vitamin E, as an anti oxidation additive. A little 4 oz squeeze bottle is useful for adding oil upside down or sideways. These also come from the industrial supply. Sewing machine oil is pretty close, but might have zinc or aluminum as an antirust compound. These may not bother a piano. I would not use automotive engine oil, too many additives. If you've disassembled it, wax might be useful.
In wood, a little sanding with twisted up sanding strip in the hole might be necessary if the wood has shrunk or warped due to moisture. A dial or vernier calipers will tell you if the hole and shaft have interference.