UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/xjoMQN3blDN+vKEJbLkFED0ZhUCK2YMT56WO4PxYUs='
WHERE
key_id = '76ee680023c7bd205592b617bfe496fdfb2d1ec78065fda7bd81074db1b6fdc1'
AND (
token = '/xjoMQN3blDN+vKEJbLkFED0ZhUCK2YMT56WO4PxYUs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)