UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DsBPwch7NptLxCKOdkZWrghq42OkMzbSLNP/s4OcPHk='
WHERE
key_id = '1f206294868e9d7331a6363cb2724f61b9201c54c9bec88aefb8d470cdbddfa5'
AND (
token = 'DsBPwch7NptLxCKOdkZWrghq42OkMzbSLNP/s4OcPHk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)