UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QZf0RyFQ02qK2gYzuuRuBxOSSDD/J1W/IWfs6U4w69o='
WHERE
key_id = 'f68ae11e96da672ddc332893e37b956dffb69e1ce58a30ec10aa239a0405d92e'
AND (
token = 'QZf0RyFQ02qK2gYzuuRuBxOSSDD/J1W/IWfs6U4w69o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)