UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uBx0XK7fL0SJtSMC6RLKj3JQ7RZ+QLBYRBGBk8U6jXY='
WHERE
key_id = 'c3f25003f2cde11bb99ba9f94ebf72479fc00a93693093a8ad86e31a061a2e19'
AND (
token = 'uBx0XK7fL0SJtSMC6RLKj3JQ7RZ+QLBYRBGBk8U6jXY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)