UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GrVmei0feItJcEW26aPyK1xNOkI94V91pJUjufOhKvc='
WHERE
key_id = '998080595dbcf97bfb4ee38e7001748dbd0ddd8d154ccd9d5a9037e66f1b7b84'
AND (
token = 'GrVmei0feItJcEW26aPyK1xNOkI94V91pJUjufOhKvc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)