How can sodium chloride melt ice or keep it frozen?
The apparent contradiction is resolved as follows: in both cases, addition of salt makes ice melt faster, which is important in the street and negligible in a beer box (or an old style cold bath used in the lab). But in doing so, it also causes the temperature of the ice and its surroundings to go well below $0^\circ\rm C$, which is important in the lab and negligible in the street.