UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hof1E0NxwR+lE1B9JBl7k9PxQDicQbFtsdRmWNoKLGw='
WHERE
key_id = 'b2eb7e4fb056bf4cc01050e1c360ed9c73b44e9b4bda291465a868c8d9248846'
AND (
token = 'hof1E0NxwR+lE1B9JBl7k9PxQDicQbFtsdRmWNoKLGw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)