When lemon juice is left out at room temperature the lemon juice will only last for 3 hours at room temperature before the lemon juice goes bad.
If you're not gonna drink the lemon juice within 3 hours then make sure to refrigerate it to keep it from going bad.
You can also freeze lemon juice and make it last longer.
Frozen lemon juice can last over a year if kept frozen.
If you buy store bought lemon juice it should always be kept refrigerated and used within 7 days of buying it because even when the lemon juice is not opened and kept refrigerated it will only last for around 7 days.
Freshly squeezed lemon juice will last for around 3 hours at room temperature and for about 7 days in the refrigerator as well.
But to keep the lemon juice longer than 7 days you should freeze it.