Some historical context seems to be missing here, or Locke must have been an Epicurean.
[0] https://en.wikipedia.org/wiki/Epicurus#Ethics
[0] https://en.wikipedia.org/wiki/Epicurus#Ethics