Dynamics of flame extinction in narrow channels with cold walls: Heat loss vs acceleration