UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'deMUlMFd/OwTWzXoA+2vNn3qTYeKQnDCbBFBM3ndHZQ='
WHERE
key_id = '382381b06d6b2a0f1308aeac6cc37c5cba4ba417d46d7b1d572376e051b22c33'
AND (
token = 'deMUlMFd/OwTWzXoA+2vNn3qTYeKQnDCbBFBM3ndHZQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)