I presume that by "locking up" you mean that it just stops responding when you press the button.
Just a wild guess, but try changing this:
if(millis() == time + (pgm_read_dword(&ulButton1[x][1]))){
to this:
if(millis() >= time + (pgm_read_dword(&ulButton1[x][1]))){
Pete