UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IWzK8+pfNAQCb0eKPPTLyw/KACH1Nu/jHC3sjyDL0IQ='
WHERE
key_id = '43072dfe0c20eb1f1ae2c46afbf0d986efaf4fce7e2c1914782c9514eed5ae90'
AND (
token = 'IWzK8+pfNAQCb0eKPPTLyw/KACH1Nu/jHC3sjyDL0IQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)