A hospital's minor injury unit has temporarily extended its opening times by two hours to ease pressure on A&E departments.