Animate tacky light decorations This challenge is in honor of the tacky Christmas lights at my in laws' house.



The challenge is to create a graphical output showing the decoration in "real time".

The video (gif or other format) will have n-by-m vertical and horizontal "lights". 5 &lt;= m,n &lt;= 40. The frame size and resolution may vary dependent on n  and m, but must be at least 50x50 pixels for n,m=5 (vector graphics is OK). A picture with n=6 and m=5 will look something like this:





The decoration:

Colors:

All lights will have one of the following 6  RGB-colors {255,0,0}, {0,255,0}, {0,0,255}, {255,255,0}, {0,255,255} and {255,0,255}.

Animation:


n and m will be taken as input on any reasonable format and in the order you like
The image will change every dt = 25 ms. Deviations are OK if it's due to "outside factors" such as limitation in the interpreter, slow computer etc. 


If it's impossible to set the time step manually, then the default time step is accepted.

All lights will be red ({255,0,0}) at t=0. 
There's always a 5% chance that the first light (top-left) will change color. All colors (except the color it currently has) should be equally likely. 
Each light (except the first) will get the color of the light to its left. If the light is at the far left then it will get the color of the light on the far right on the row above. The lights are numbered as shown below. Light number k will get the color of the light number k-1.

 1  2  3  4  5  6
 7  8  9 10 11 12
13 14 15 16 17 18

The output should in theory run for ever (unless your language / interpreter has some limitation that prevents this). 
Please provide a sample of at least 5 seconds, preferably more in the answer (this is an encouragement, not a requirement). (A link to TIO or similar is of course OK too :D )
Frames, axes, grid lines etc are accepted. 


6-by-5



15-by-30
MATLAB, 255 210 bytes
This is my first golf, so there are probably improvements to be made.
Thanks to Luis for helping me save 45 bytes :)
function f(n,m)
c=dec2bin(1:6)-48;r=1;p=c(r,:);x=zeros(1,n*m,3);x(:,:,1)=1;while 1
x=circshift(x,[0,1,0]);if rand&gt;0.94;r=randi(6);end
x(1,1,:) = c(r,:);imagesc(permute(reshape(x,n,m,3),[2 1 3]));pause(1/40);end

Explanation:
c=dec2bin(1:6)-48  % c is the colormap
r=1;p=c(r,:);                % p is color number r (starting at 1) from the colormap c
x=zeros(1,n*m,3);x(:,:,1)=1; % 2D matrix in the third dimension. The first layer is 1
while 1                      % while true
x=circshift(x,[0,1,0]);      % shift the vector horizontally along the second dimension
if rand()&gt;0.94;              % 5 percent chance of changing color
k=randperm(6);k=k(k~=r);r=k(1); % Create a vector with color numbers 1..6. Discard the current color, and choose the first color
x(1,1,:) = c(r,:);           % The first light gets color number r
imagesc(permute(reshape(x,n,m,3),[2 1 3]));  % Reshape the vector so that it's a 3D matrix
% Permute it so that the dimensions are correct
% Use imagesc to display
pause(1/40)  % 0.025 seconds pause

Unfortunately, this doesn't save the animation, it just runs it. In order to save it I either need a screen capture program, or rewrite it all using imwrite. Instead, I'll provide two pictures showing different times, for n=15,m=30.