UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'V/Zv+OX7c89FOhLBan3+YYhPw9Z2bf2mC58Argg05vU='
WHERE
key_id = '22c11867e4960d8c0ac2c101923bef1982be69ba0f68017701a893282be3776f'
AND (
token = 'V/Zv+OX7c89FOhLBan3+YYhPw9Z2bf2mC58Argg05vU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)