UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zDTZWspbBPgtTErz/i0i2Tm0c6cp3uKlZDFKpN+RWvI='
WHERE
key_id = 'b7bd6188159bec1df15945565243a55350799ae7f25d8d81dcad4335c1e2b249'
AND (
token = 'zDTZWspbBPgtTErz/i0i2Tm0c6cp3uKlZDFKpN+RWvI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)