Golden rule, take out of the refrigerator only the amount of ingredients that you can manage, "or use", to prepare the final food in a short period of time, remember you want to keep the food out of the temperature danger zone and any time you keep it in that zone will add up to a total limit of 4 hrs, after that it is recommended no consume the food/ingredient.
There are some variables that will influence in the development of microorganism in the food, ("FATTOM") like: type of food, acidity, time of exposure, temperature of room, oxygen and moisture (or water activity).