UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lzUC3/WgvvDJMM1HdvQaaIeUBVWd5AbuQKhs05XM3xk='
WHERE
key_id = '9984af91efbab26e0c96d45eeb8781ec85c49fce62e5086f5bdb487cc317b925'
AND (
token = 'lzUC3/WgvvDJMM1HdvQaaIeUBVWd5AbuQKhs05XM3xk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)