Don't worry, this won't affect the properties of the cream/moisturiser. Simply put it in the fridge for about 20 minutes. Once it has cooled down, stir it until it reaches a creamy texture. Then place it in the fridge again until it becomes solid.
Try and avoid this happening regularly as it may impair the quality and shelf life of your cream/moisturiser.