UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mz8nQMOK2lcD+VKbGbICuFciZeL/jHJF3ERncFPree0='
WHERE
key_id = 'aab73680a2031c10b5024e41eaa9886e8bb2417cbd5fea29a6183fd8f815dda9'
AND (
token = 'mz8nQMOK2lcD+VKbGbICuFciZeL/jHJF3ERncFPree0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)