UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RHXgEWHPrSqJ3elckMfZQaYNb6YDJItKkOwfac1PaGg='
WHERE
key_id = '25c3db5ffc25616b794ab7a000c7ee9260a8f5d5fa22295886acbdcc1e6963f0'
AND (
token = 'RHXgEWHPrSqJ3elckMfZQaYNb6YDJItKkOwfac1PaGg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)