How to keep a lunch box fresh for more than 2 hours? I've been searching about making a lunch box. From what I searched, food is usually safe for up to 2 hours after it was taken from the fridge (pasta, hardboiled egg, etc).

However, if commuting takes 2 hours and the place I'm going doesn't have a fridge, which foods could I bring and make sure they're still fine to eat?

Maybe I'm wrong, but I think most people leave their lunch boxes for more than 2 hours before they can get to eat them. Is it still fine to eat?

I also read that eggs especially shouldn't be eaten after 2 hours, However, I've seen a lot of students, incl. me eat egg sandwiches 2 hours later. Is this a written rule that nobody follows?

I was planning on making some cold pasta with cucumber, cherry tomatoes, hardboiled egg (?), carrot, pickles and some fruit on the side, but now I'm not sure whether it is safe to bring and eat after ~4-5 hours.
For a great answer on safety and temperature, see this answer.

For your lunch, you could get an reusable ice pack to keep your food chilled.  

You could also separate the ingredients that need to stay chilled from those that don't and mix them just prior to eating.