UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'veUMi2rRe6B0Xz7FpR91H6FxwlSOJz/Ac9wB+sIZdgQ='
WHERE
key_id = '8384ebae7402bcee2cb6ccfb945168195d00f6e7f2fcf3f4e664d59a42e3d664'
AND (
token = 'veUMi2rRe6B0Xz7FpR91H6FxwlSOJz/Ac9wB+sIZdgQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)