UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+/QUcfxyZq/OMGi2DPrDiUOax2aXbaAEkn45QK5SLgQ='
WHERE
key_id = 'b5dec569747e0a4bd0d92c9bf5a1700831cc973c8fc21746a456e657f7d5eace'
AND (
token = '+/QUcfxyZq/OMGi2DPrDiUOax2aXbaAEkn45QK5SLgQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)