Jos Buttler's half-century kept Lancashire in the hunt for a quarter final berth in the Natwest T20 Blast.