UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zUr5meepv0+PjNVl0hOWIgFd1WGJsGMp0E+KfDfBmLE='
WHERE
key_id = '73647e7a51764ebab9aa33b2a780bded23fd83d0a777bd0403b3bd24b180b8ed'
AND (
token = 'zUr5meepv0+PjNVl0hOWIgFd1WGJsGMp0E+KfDfBmLE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)