A good guitar warm-up takes 5 to 10 minutes: shake out your hands, play a slow finger exercise (the spider walk), run a scale such as A minor pentatonic and practice easy chord changes. Keep everything slow and relaxed, and stop if anything hurts.
Quick answer: spend 5 to 10 minutes on slow, easy playing before you push hard: loosen your hands, play a slow one-two-three-four finger exercise across the strings, run the A minor pentatonic scale and practice a few easy chord changes. Research has not shown that warming up prevents injury, so use it to make practice comfortable, and stop if you feel pain.
