  The KOTO experiment has recently performed a search for neutral Kaons
decaying into neutral pions and a pair of neutrinos. Three events were observed
in the KOTO signal region, with an expected background of about 0.05. Since no
clear signal of systematic errors have been found, the excess of events in the
decay $K_{L}\rightarrow\pi^0\nu\bar{\nu}$ is quite intriguing. One possibility
to explain this anomaly would be the presence of a scalar $\phi$ with mass of
the order of the pion mass and inducing decays $K_L \to \pi^0 \phi$ which mimic
the observed signal.A scalar with mass of the order of the pion mass and a
coupling to muons of the order of the Standard Model Higgs coupling could also
explain the muon anomalous magnetic moment anomaly $(g-2)_{\mu}$. We built on
these facts to show that a light singlet scalar with couplings to the leptons
and quarks as the ones induced by mixing with Higgs states in two Higgs doublet
models may lead to an explanation of both anomalies. More specifically, we show
that this is the case in the so-called type-X models in which leptons and
quarks couple to two different Higgs doublets, and for scalar masses that are
in the range between 40 and 70 MeV. Due to the relatively large coupling to
leptons required to fit $(g-2)_{\mu}$, the scalar lifetime accidentally falls
into the sub-nanosecond range which is essential to evade the severe proton
beam dump experiments and astrophysical constraints, though it becomes
sensitive to constraints from electron beam dump experiments. The additional
phenomenological properties of this model are discussed.
