If your machine has not drained or has stopped for some reason the door will stay locked as a preventative measure to avoid a leak, however its also possible that the locking device itself is faulty and may need repair or replacement. Firstly, assess whether there is still water inside the machine and if not then try turning machine off for 5 minutes as the electronic lock will need a few minutes to open. If it still refuses to open call a technician who can repair this.