UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Y+uejvAHnahu/oSH/Qvf+oXcAPATsH1FH/wkoFG4oh8='
WHERE
key_id = '101f5b7da485ce4fe8ba188a56c5adfcd67b2798d42492d7e2964cce66dccc6a'
AND (
token = 'Y+uejvAHnahu/oSH/Qvf+oXcAPATsH1FH/wkoFG4oh8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)