Lancashire is to get more than £30m to strengthen bus services in the county.