UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 't0I2MR+sdSinEpOO45Q76WJYV8fdB5fnNb25mf1Y07A='
WHERE
key_id = '00293c5a10d3c0bfeb4077a4983b2993d58777741b7dca6a814f940f82f46022'
AND (
token = 't0I2MR+sdSinEpOO45Q76WJYV8fdB5fnNb25mf1Y07A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)