UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'P/i2nDIRC5MyJN1Fw+cCL8I2SVFG4xy6sUuG7vO3sUQ='
WHERE
key_id = '09d9ae3ea5d58927b833b8d17dcc00d29cc410de0ca3e004589a1878d651e094'
AND (
token = 'P/i2nDIRC5MyJN1Fw+cCL8I2SVFG4xy6sUuG7vO3sUQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)