UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1q70g/Mpdf2vBjV7RSPsaeOKPKVuAwcTIXCybOBCQvA='
WHERE
key_id = 'f7936675bb25c6722e9bed62de5ab4f703d40735a7c47a7c250b52f6dd122f63'
AND (
token = '1q70g/Mpdf2vBjV7RSPsaeOKPKVuAwcTIXCybOBCQvA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)