UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zzIiV8mxt5p3TcOOl8lYPeHEY6LIHjDs9kw6P5SIAzo='
WHERE
key_id = '29ed01c8ad9eeb949c2c3576ba9f36ec5cecea7a950b4ad9c4662831dc18cee2'
AND (
token = 'zzIiV8mxt5p3TcOOl8lYPeHEY6LIHjDs9kw6P5SIAzo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)