This simple question is harder to answer than one might expect.
There's two ways to interpret / parse the sentence
Li ne trovas la lampon en la kesto.
lamp not found in the box
"en la kesto" could be the location where "li" doesn't find the lamp. (So the sentence wouldn't making a statement about whether the lamp actually is in the box and he just overlooks it while looking in there, or whether it can't be found in the box because it's actually somewhere else, nor whether he finds it at that other place.)
lamp in the box not found
"en la kesto" could also be a part of the direct object, i.e., the sentence implies that the lamp indeed is in the box, but "li" doesn't find it. (In this case, the sentence wouldn't make any statement about whether he even looks in the box, or maybe doesn't find the lamp because he's searching elsewhere.)
(Note that the English sentence
He does not find the lamp in the box.
suffers from the same ambiguity.)
So one might be tempted to re-arrange the sentence to make it less ambiguos, and come up with
La lampon en la kesto li ne trovas.
This gives a strong hint, that "en la kesto" belongs to "la lampon" rather than to "ne trovas" or to the whole sentence, i.e., that the lamp indeed is in the box, but he doesn't find it. (Again without any implication about where he's even looking for it, if at all.)
Though, even in this order, the sentence can be interpreted / parsed in both ways:
lamp in the box not found (likely)
"la kesto" being the location of the lamp:
lamp not found in the box (unlikely, but possible)
"la kesto" being the location of the not-finding:
Not all interpretations equally likely
However, while in the standard word order "Li ne trovas la lampon en la kesto.", both interpretations seem similarly plausible to me, my feeling about this word order is that it's much more likely that the intended meaning is that "en la kesto" is indeed part of the object and thus the location of the lamp, rather than the location of the not-finding.
Even if we subscribe to the same parsing for both sentences (no matter, which one of the two options), there can be a very slight difference in meaning, because a non-default word order can imply that the beginning of the sentence is the "theme" ("topic"; something assumed to be known) while the remainder/ending is the "rheme" ("focus"; something new communicated by the sentence). Thus, the non-default word order with the object at the beginning might imply that the lamp (and maybe also its location in the box, depending on the parsing) was already talked about, and that him not finding it is the new information added by this sentence.