UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZN/zpV8x7P87tN6GxCBXAxcX3kyTgKKEBVx9FxQ6kqM='
WHERE
key_id = '226c32952d75f2289f38c558b42765a881ec6a34bc1bd50a76e5caa51599010c'
AND (
token = 'ZN/zpV8x7P87tN6GxCBXAxcX3kyTgKKEBVx9FxQ6kqM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)