UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Gl5+elYr1YYT2uYC4k/bhDmxSz12xSZSTQOkW9O0YSQ='
WHERE
key_id = '6bb634b998f26bd4e71dac55f4b7f698ff875d40e2f4e1e6f5334336311ba371'
AND (
token = 'Gl5+elYr1YYT2uYC4k/bhDmxSz12xSZSTQOkW9O0YSQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)