UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zNvKUh1vXBQ2Sv5cUjiAJjzfBNB7kL47LQbR1e1Yq/o='
WHERE
key_id = 'e26786ae2cf0d465c914b8b62fba8609c9d8fbc5727914b1db976ccb1dde8a71'
AND (
token = 'zNvKUh1vXBQ2Sv5cUjiAJjzfBNB7kL47LQbR1e1Yq/o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)