Adding a virtual unique key constraint in MySQL