UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Jse/9QgXgeBZnAfoQGBwy5hNKD9HGfcY4zck9/gPPhM='
WHERE
key_id = '72a2dbb8c6c2b22ae0e316b96a05acaa9d3f64a6ecb5ce2e2f33447d24962626'
AND (
token = 'Jse/9QgXgeBZnAfoQGBwy5hNKD9HGfcY4zck9/gPPhM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)