A search for a long-lived scalar particle χ is performed, looking for the decay B+→K+χ with χ→μ+μ- in pp collision data corresponding to an integrated luminosity of 3 fb-1, collected by the LHCb experiment at center-of-mass energies of s=7 and 8 TeV. This new scalar particle, predicted by hidden sector models, is assumed to have a narrow width. The signal would manifest itself as an excess in the dimuon invariant mass distribution over the Standard Model background. No significant excess is observed in the accessible ranges of mass 250<m(χ)<4700 MeV/c2 and lifetime 0.1<τ(χ)<1000 ps. Upper limits on the branching fraction B(B+→K+χ(μ+μ-)) at 95% confidence level are set as a function of m(χ) and τ(χ), varying between 2×10-10 and 10-7. These are the most stringent limits to date. The limits are interpreted in the context of a model with a light inflaton particle.