I've found some ice packs (called Kryopack) that can be wrapped around a bottle. Then I use an elastic band to secure it in place before I put it in a thermal bag. This keeps the bottle cold for 4 hours (at least). For longer times, I often carry pre-measured formula in a separate container and I fill another bottle with the correct amount of water. When it's time for my LO's feed, I just dump the formula into the bottle and shake. This way I know the formula I am serving my LO is fresh and not spoiled.
HTH.