UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6sscvmeDwcZvCDN2VLSMR41SYTh/N4N/BtgbfGaAnoM='
WHERE
key_id = '72e04bd53458b76cb699bf1f948d4518053078dd902939178656451c34dfe529'
AND (
token = '6sscvmeDwcZvCDN2VLSMR41SYTh/N4N/BtgbfGaAnoM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)