UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+K/KUKmj0gBwymD4pUShPrypEq55VZcn6ju/6Y2IrD0='
WHERE
key_id = 'dc34ef76267cd755d5da89e00c9dbee758d26091374ebd4981361c7a3a342022'
AND (
token = '+K/KUKmj0gBwymD4pUShPrypEq55VZcn6ju/6Y2IrD0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)